<?php
namespace App\Services\Strategy;

use App\Services\Strategy\CentralChinaScrollImg;
use App\Services\Strategy\EasternChinaScrollImg;
use App\Services\Strategy\NortheastScrollImg;
use App\Services\Strategy\NorthwestScrollImg;
use App\Services\Strategy\Page;
use App\Services\Strategy\SouthChinaScrollImg;
use App\Services\Strategy\SouthwestScrollImg;

class ScrollImg
{
<<<<<<< HEAD
    public function provinceSelect($type,$district_id)
=======
<<<<<<< HEAD
    public function provinceSelect($type,$id)
=======
<<<<<<< HEAD
    public function provinceSelect($type,$id)
=======
<<<<<<< HEAD
    public function provinceSelect($type,$id)
=======
    public function provinceSelect($type,$district_id)
>>>>>>> ba16dd1753d15808db3b29ea7d71d2dcbc440fff
>>>>>>> ad3f2ce75fb6a6518d685720d3e13e7eb6b3b462
>>>>>>> 5b8878cf77da32ab9fb02103e80d26f0a43187e4
>>>>>>> 75818497ef9bb23fd6bd1547c9e88686d864b7ad
    {
        switch ($type){
            //华北b
            case '河北省':
            case '天津市':
            case '北京市':
            case '内蒙古':
            case '山西省':
                $obj =  new NorthChinaScrollImg();
                break;
            //华东
            case '台湾省':
            case '安徽省':
            case '山东省':
            case '上海市':
            case '福建省':
            case '江西省':
            case '浙江省':
            case '江苏省':
                $obj =  new EasternChinaScrollImg();
                break;
            //华中
            case '河南省':
            case '湖北省':
            case '湖南省':
                $obj =  new CentralChinaScrollImg();
                break;
            //华南
            case '广西省':
            case '广东省':
            case '海南省':
            case '香港':
            case '澳门':
                $obj =  new SouthChinaScrollImg();
                break;
            //东北
            case '黑龙江省':
            case '吉林省':
            case '辽宁省':
                $obj =  new NortheastScrollImg();
                break;
            //西北
            case '新疆':
            case '甘肃省':
            case '青海省':
            case '陕西省':
            case '宁夏':
                $obj =  new NorthwestScrollImg();
                break;
            //西南
            case '重庆市':
            case '四川省':
            case '贵州省':
            case '云南省':
            case '西藏':
                $obj =  new SouthwestScrollImg();
                break;
        }
        $res = new Page();
        $res->setStrategy($obj);
<<<<<<< HEAD
        return $res->index($district_id);
=======
<<<<<<< HEAD
        return $res->index($id);
=======
<<<<<<< HEAD
        return $res->index($id);
=======
<<<<<<< HEAD
        return $res->index($id);
=======
        return $res->index($district_id);
>>>>>>> ba16dd1753d15808db3b29ea7d71d2dcbc440fff
>>>>>>> ad3f2ce75fb6a6518d685720d3e13e7eb6b3b462
>>>>>>> 5b8878cf77da32ab9fb02103e80d26f0a43187e4
>>>>>>> 75818497ef9bb23fd6bd1547c9e88686d864b7ad
    }
}